{include file="public/_meta" /}
<link href="__PUBLIC_ADMIN__css/plugins/footable/footable.core.css" rel="stylesheet">
</head>

<body class="gray-bg">
   <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>FooTable分页、排序、过滤演示</h5>

                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="refresh">
                                <i class="fa fa-refresh"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <input type="text" class="form-control input-sm m-b-xs" id="filter"
                               placeholder="搜索表格...">

						<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="50" data-filter=#filter>
                            <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>CID</th>
                                        <th>项目名称</th>
                                        <th>用户姓名</th>
                                        <th>小程序APPID</th>
                                        <th>创建时间</th>
                                        <th>过期时间</th>
                                        <th>操作</th>
                                        <th data-hide="all">用户手机</td>
                                        <th data-hide="all">商户号</td>
                                        <th data-hide="all">商户密钥</td>
                                        <th data-hide="all">公众号APPID</td>
                                        <th data-hide="all">公众号Secret</td>
                                        <th data-hide="all">备注内容</td>
                                    </tr>
                                </thead>
                                <tbody>
                                	{foreach name="res" id="vo" key="key"}
                                    <tr class="gradeX">
                                        <td>{$vo.id}</td>
                                        <td>{$vo.sign}</td>
                                        <td>{$vo.project}</td>
                                        <td class="center">{$vo.name}</td>
                                        <td class="center">{$vo.appid}</td>
                                        <td>{$vo.create_time|date="Y-m-d ",###}</td>
                                        <td>{$vo.expire}</td>
                                        <td><a href="#" class="btn btn-white btn-sm edit"><i class="fa fa-pencil"></i> 编辑 </a></td>
                                        <td>{$vo.mobile}</td>
                                        <td>{$vo.pay_mchid}</td>
                                        <td>{$vo.pay_key}</td>
                                        <td>{$vo.gzh_appid}</td>
                                        <td>{$vo.gzh_secret}</td>
                                        <td>{$vo.comment}</td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                                <tfoot>
                                    <tr>
                                        <td colspan="5">
                                            <ul class="pagination pull-right"></ul>
                                        </td>
                                    </tr>
                                </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
        
    {include file="public/_footer" /}
	<script src="__PUBLIC_ADMIN__js/plugins/footable/footable.all.min.js"></script>
	
    <!-- 自定义js -->
    <script src="__PUBLIC_ADMIN__js/content.js?v=1.0.0"></script>
    <script>
        $(document).ready(function() {
            $('.footable').footable();
            $('.footable2').footable();
			
            $('.refresh').click(function(){
            	window.location.reload();	// 刷新页面
            })
            
          	//iframe窗
          	$('.edit').click(function(){
          		var index = layer.open({
          			type : 2,
					fixed: true,
					scrollbar: false,
					title : '编辑',
					shadeClose : false,
					maxmin : true, //开启最大化最小化按钮
					area : ['893px', '600px'],
					//offset: '100px',
					content : '{:url("admin/admin/edit")}'
          		});
          		layer.full(index);
          	})
		});
	</script>
</body>
</html>
